There are a number of data processing applications where it is often required to perform reciprocal operations, a reciprocal operation being an operation of the form 1/Fn(d), where d is the input value. Two such reciprocal operations that are often required involve computing the reciprocal of the input value, i.e. 1/d, or the reciprocal square root of the input value, i.e. 1/√{right arrow over (d)}. These particular two reciprocal operations are often used, for example, in graphics processing applications.
Dedicated hardware may be developed to perform such reciprocal operations but typically it is desirable to keep the data processing apparatus as small as possible, and to re-use hardware logic wherever possible.
A known technique for determining the results of complex functions such as reciprocal and reciprocal square root functions, which does not require dedicated hardware, employs iterative execution of a computation in order to converge on the result value. One particular such iterative process is commonly referred to as the Newton-Raphson method. In accordance with the Newton-Raphson method, an initial estimate of the result value is made, and then a refinement step is iteratively executed in order to converge on the actual result value.
The Motorola AltiVec technology uses such a Newton-Raphson refinement technique for evaluating reciprocal and reciprocal square root functions. Another example of a data processing apparatus which employs the Newton-Raphson refinement technique for calculating reciprocals and reciprocal square roots is described in U.S. Pat. No. 6,115,733. In both of these systems, an initial estimate generator is used to determine, based on the input value, an initial estimate of a result value for the reciprocal operation. Typically, a lookup table is used for determining this initial estimate, a different lookup table being provided for each type of reciprocal operation supported.
The quality of the initial estimate is essential to fast execution of a reciprocal operation, and the size of the initial estimate value defines the number of iteration steps required to reach a specified precision.
In some data processing apparatus, the data processing apparatus is required to handle both fixed point data values and floating point data values. A fixed point data value is one where a binary point is implied to exist at a predetermined point within the data value. For example, a 16.16 fixed point format assumes that a 32-bit value has 16 bits prior to the binary point and 16 bits after the binary point. An integer value is a particular instance of a fixed point value in which the binary point is considered to exist immediately to the right of the least significant bit.
A floating point data value considered to be in a “normal” range can be expressed as follows:±1.x*2y 
where:                x=fraction        1.x=significand (also known as the mantissa)        y=exponentA floating point data value in the defined subnormal range can be expressed as follows:±0.x*2min         
where:                x=fraction        0.x=significand (also known as the mantissa)        min=−126 for single precision values and −1022 for double precision values        
If the performance of reciprocal operations were to be supported for both floating point data values and fixed point data values, then it would be considered necessary to provide separate estimator logic for each data format, along with associated separate lookup tables for each data format.
However, in a data processing apparatus, it is typically desired to keep the size of the data processing apparatus as small as possible, and in particular to enable efficient use of the logic provided within the data processing apparatus. Accordingly, with regard to the generation of an initial estimate for a reciprocal operation, it would be desirable to provide a data processing apparatus which was able to implement the required estimate generation logic in an efficient manner, whilst also supporting determination of initial estimates for both floating point and fixed point data values.